package mapper;

import model.PrescriptionDetail;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

public interface PrescriptionDetailMapper {
    @Insert("insert into prescription_detail (prescription_id, registry_id, drug_id, patient_id, amount, is_medicare, price,pay_price,medicare_price)" +
            "values (#{prescriptionId},#{registryId},#{drugId},#{patientId},#{amount},#{isMedicare},#{price},#{payPrice},#{medicarePrice})")
    @Options(useGeneratedKeys = true,keyColumn = "id",keyProperty = "id")
    int add(PrescriptionDetail detail);
}
